const EventEmitter = require("events").EventEmitter;

class GeekTime extends EventEmitter {
    constructor() {
        super();

        setInterval(() => {
            this.emit('product', { price: Math.random() * 100 });
        }, 2000);
    }
}

const geekTime = new GeekTime;

module.exports = geekTime;



